package com.bwie.bookOrder.controller;

import com.bwie.bookOrder.service.BookOrderService;
import com.bwie.common.domain.Menu;
import com.bwie.common.domain.Oder;
import com.bwie.common.results.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/bookOrder")
public class BookMenuOrderController {
    @Autowired
    BookOrderService bookOrderService;


    @PostMapping("/bookMenuOrder")
    public Result bookMenuOrderList(@RequestBody Oder oder){
        return bookOrderService.bookMenuOrderList(oder);
    }

   @PostMapping("/bookMenu")
public Result bookMenuList(@RequestBody Menu menu){
return bookOrderService.bookMenuList(menu);
   }

   @PostMapping("/bookMenusInsert")
    public Result bookMenuInsert(@RequestBody  Menu menu){
        return bookOrderService.bookMenuInsert(menu);
   }


    @PostMapping("/bookMenusupdate")
    public Result bookMenuUpdate(@RequestBody  Menu menu){
return bookOrderService.bookMenuUpdate(menu);
    }

    @PostMapping("/bookMenuOrderInsert")
    public Result bookMenuOrderInsert(Oder oder){
        return bookOrderService.bookMenuOrderInsert(oder);
    }

    @PostMapping("/bookMenuOrderUpdate")
    public Result bookMenuOrderUndate(@RequestBody  Oder oder){
        return bookOrderService.bookMenuOrderUndate(oder);
    }


}
